<?php
/**
 * @version SVN: $Id: view.html.php 1172 2010-04-25 15:18:26Z elkuku $
 * @package    EasyCreator
 * @subpackage Views
 * @author     EasyJoomla {@link http://www.easy-joomla.org Easy-Joomla.org}
 * @author     Nikolai Plath {@link http://www.nik-it.de}
 * @author     Created on 03-Mar-08
 * @license    GNU/GPL, see JROOT/LICENSE.php
 */

//-- No direct access
defined('_JEXEC') or die('=;)');

jimport( 'joomla.application.component.view');

/**
 * HTML View class for the EasyCreator Component
 *
 * @package EasyCreator
 * @subpackage Views
 */
class EasyCreatorViewEasyCreator extends JView
{
    public function display($tpl = null)
    {
        /*
         * Check for evil IE
         * sry - no support for this in penguin land =;)
         */

        jimport('joomla.environment.browser');

        $browser = new JBrowser();

        if ($browser->getBrowser() == 'msie')
        {
            JError::raiseWarning(0, JText::_('This extension is not compatible with MS internet explorer R'));
        }

        //-- Check if we are on localhost - otherwise display a warning
        if (JComponentHelper::getParams('com_easycreator')->get('warn_livesite'))
        {
            $ip = getenv('REMOTE_ADDR');

            if ($ip && $ip != '127.0.0.1')
            {
                JError::raiseNotice(100, JText::_('ECR_INSTALL_WARN_LOCAL_DEV'));
                JError::raiseNotice(100, JText::_('ECR_INSTALL_JDOC_LINK'));
            }
        }

        parent::display($tpl);

        ecrHTML::easyFormEnd();
    }// function

}// class
